<?php
/**
 * @copyright	Copyright (C) 2008 - 2011 ZooTemplate.com. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
include_once (dirname(__FILE__).DS.'libs'.DS.'zt_tools.php');
include_once (dirname(__FILE__).DS.'zt_menus'.DS.'zt.common.php');
include_once (dirname(__FILE__).DS.'libs'.DS.'zt_vars.php');
unset($this->_scripts[$this->baseurl . '/media/system/js/caption.js']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>">
<head>
<jdoc:include type="head" />
<?php JHTML::_('behavior.mootools'); ?>
	<?php
		$document = JFactory::getDocument();
		$document->addStyleSheet($ztTools->templateurl() . 'css/template.css');
		$document->addStyleSheet($ztTools->baseurl() . 'templates/system/css/system.css');
		$document->addStyleSheet($ztTools->baseurl() . 'templates/system/css/general.css');
		$document->addStyleSheet($ztTools->templateurl() . 'css/default.css');
		
		
		if($ztrtl == 'rtl') {
			$document->addStyleSheet($ztTools->templateurl() . 'css/template_rtl.css');
			$document->addStyleSheet($ztTools->templateurl() . 'css/typo_rtl.css');
		} else {
			$document->addStyleSheet($ztTools->templateurl() . 'css/typo.css');
		}
		
		if($ztTools->getParam('zt_google_fonts')) {
			$document->addStyleSheet($ztTools->templateurl() . 'css/googlefonts.css');
		}
		
		/*$document->addScript($ztTools->templateurl() . 'js/zt.script.js');*/
		
	?>

	<?php if($ztTools->getParam('zt_google_fonts')) : ?>
	<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz' rel='stylesheet' type='text/css' />
	<?php endif; ?>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/modules.css" type="text/css" />		
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/css3.php?url=<?php echo $ztTools->templateurl(); ?>" type="text/css" />
	<script type="text/javascript">
		var baseurl = "<?php echo $ztTools->baseurl() ; ?>";
		var ztpathcolor = '<?php echo $ztTools->templateurl(); ?>css/colors/';
		var tmplurl = '<?php echo $ztTools->templateurl();?>';
		var CurrentFontSize = parseInt('<?php echo $ztTools->getParam('zt_font');?>');
	</script>
	<!--[if lte IE 6]>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/ie6.css" type="text/css" />
	<script type="text/javascript" src="<?php echo $ztTools->templateurl() ?>js/ie_png.js"></script>
	<script type="text/javascript">
	window.addEvent ('load', function() {
	   ie_png.fix('.png');
	});
	</script>
	<![endif]-->
	<!--[if lte IE 7]>
	<link rel="stylesheet" href="<?php echo $ztTools->templateurl(); ?>css/ie7.css" type="text/css" />
	<![endif]-->
</head>
<body id="bd" class="fs<?php echo $ztTools->getParam('zt_font'); ?> <?php echo $ztTools->getParam('zt_display'); ?> <?php echo $ztTools->getParam('zt_display_style'); ?> <?php echo $ztrtl; ?>">
<div id="zt-wrapper">	
		
		<!-- HEADER -->
		<div id="zt-header" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-header-inner">
				
					<div id="zt-logo">
						<h1 id="logo"><a class="png" href="<?php echo $ztTools->baseurl() ; ?>" title="<?php echo $ztTools->sitename() ; ?>">
							<span><?php echo $ztTools->sitename() ; ?></span></a>
						</h1>
					</div>
					<div id="zt-mainmenu" >
						<div id="zt-mainmenu-inner" >
							<?php $menu->show(); ?>
						</div>
					</div>
				
				</div>
			</div>
		</div>
		<!-- END HEADER -->
		
		<?php if($this->countModules('slideshow')) : ?>
		<div id="zt-userwrap1" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-userwrap1-inner">
					<div id="zt-slideshow">
						<div id="zt-slideshow-inner">
							<jdoc:include type="modules" name="slideshow" />
						</div>	
					</div>
				</div>
			</div>
		</div>
		<?php endif; ?>
		
		<?php
		$spotlight = array ('user1','user2','user3','user4');
		$consl = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100,'%');
		if( $consl) :
		?>	
		<div id="zt-userwrap2" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-userwrap2-inner">

					<?php if($this->countModules('user1')) : ?>
					<div id="zt-user1" class="zt-user zt-box<?php echo $consl['user1']['class']; ?>" style="width: <?php echo $consl['user1']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user1" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
					
					<?php if($this->countModules('user2')) : ?>
					<div id="zt-user2" class="zt-user zt-box<?php echo $consl['user2']['class']; ?>" style="width: <?php echo $consl['user2']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user2" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
					
					<?php if($this->countModules('user3')) : ?>
					<div id="zt-user3" class="zt-user zt-box<?php echo $consl['user3']['class']; ?>" style="width: <?php echo $consl['user3']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user3" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
					
					<?php if($this->countModules('user4')) : ?>
					<div id="zt-user4" class="zt-user zt-box<?php echo $consl['user4']['class']; ?>" style="width: <?php echo $consl['user4']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user4" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>

				</div>
			</div>
		</div>
		<?php endif; ?>
	
		
		<!-- MAINBODY -->
		<div id="zt-mainbody" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-mainbody-inner">
				
					<!-- CONTAINER -->
					<div id="zt-container<?php echo $zt_width; ?>" class="clearfix">
					<?php include ("templates/$this->template/libs/zt_quadro.php"); ?>
							<?php if($this->countModules('left')) : ?>
							<div id="zt-left">
								<div id="zt-left-inner">
									<jdoc:include type="modules" name="left" style="ztxhtml" />
								</div>
							</div>
							<?php endif; ?>

							<div id="zt-maincontent">
							<div id="zt-maincontent-inner">
							
								<?php if($this->countModules('user5')) : ?>
								<div id="zt-user5" class="clearfix">
									<jdoc:include type="modules" name="user5" style="ztxhtml" />
								</div>
								<?php endif; ?>
									
								<div id="zt-component" class="clearfix">
									<jdoc:include type="message" />
									<jdoc:include type="component" />
								</div>
								
								<?php
								$spotlight = array ('col1','col2');
								$botsl1 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100,'%',45);
								if( $botsl1 ) :
								?>
								<div id="zt-userwrap3">
									<div id="zt-userwrap3-inner">
										<?php if($this->countModules('col1')) : ?>
											<div id="zt-col1" class="zt-user zt-box<?php echo $botsl1['col1']['class']; ?>" style="width: <?php echo $botsl1['col1']['width']; ?>;">
												<div class="zt-box-inside">
													<jdoc:include type="modules" name="col1" style="ztxhtml" />
												</div>
											</div>
										<?php endif; ?>
										
										<?php if($this->countModules('col2')) : ?>
											<div id="zt-col2" class="zt-user zt-box<?php echo $botsl1['col2']['class']; ?>" style="width: <?php echo $botsl1['col2']['width']; ?>;">
												<div class="zt-box-inside">
													<jdoc:include type="modules" name="col2" style="ztxhtml" />
												</div>
											</div>
										<?php endif; ?>
										
									</div>
								</div>	
								<?php endif; ?>

								<?php
								$spotlight = array ('col3','col4','col5');
								$botsl1 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:99,'%');
								if( $botsl1 ) :
								?>
								<div id="zt-userwrap6" class="clearfix">
									<div id="zt-userwrap6-inner">

										<?php if($this->countModules('col3')) : ?>
											<div id="zt-col3" class="zt-user zt-box<?php echo $botsl1['col3']['class']; ?>" style="width: <?php echo $botsl1['col3']['width']; ?>;">
												<div class="zt-box-inside">
													<jdoc:include type="modules" name="col3" style="ztxhtml" />
												</div>
											</div>
										<?php endif; ?>
										
										<?php if($this->countModules('col4')) : ?>
											<div id="zt-col4" class="zt-user zt-box<?php echo $botsl1['col4']['class']; ?>" style="width: <?php echo $botsl1['col4']['width']; ?>;">
												<div class="zt-box-inside">
													<jdoc:include type="modules" name="col4" style="ztxhtml" />
												</div>
											</div>
										<?php endif; ?>
										
										<?php if($this->countModules('col5')) : ?>
											<div id="zt-col5" class="zt-user zt-box<?php echo $botsl1['col5']['class']; ?>" style="width: <?php echo $botsl1['col5']['width']; ?>;">
												<div class="zt-box-inside">
													<jdoc:include type="modules" name="col5" style="ztxhtml" />
												</div>
											</div>
										<?php endif; ?>

									</div>
								</div>	
								<?php endif; ?>								
								
							   <?php if($this->countModules('user6')) : ?>
							   <div id="zt-user6" class="clearfix">
									<jdoc:include type="modules" name="user6" style="ztxhtml" />
							   </div>
								<?php endif; ?>

							</div>
							</div>

						</div>
						<!-- END CONTAINER -->
				</div>
			</div>		
		</div>
		<!-- END MAINBODY -->
		
		<?php
		$spotlight = array ('user7','user8','user9','user10');
		$botsl2 = $ztTools->calSpotlight($spotlight,$ztTools->isOP()?100:100, '%');
		if( $botsl2 ) :
		?>
		<div id="zt-userwrap4" class="clearfix">
			<div class="zt-wrapper ">
				<div id="zt-userwrap4-inner">

					<?php if($this->countModules('user7')): ?>
					<div id="zt-user7" class="zt-user zt-box<?php echo $botsl2['user7']['class']; ?>" style="width:<?php echo $botsl2['user7']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user7" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>

					<?php if($this->countModules('user8')): ?>
					<div id="zt-user8" class="zt-user zt-box<?php echo $botsl2['user8']['class']; ?>" style="width:<?php echo $botsl2['user8']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user8" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>

					<?php if($this->countModules('user9')) : ?>
					<div id="zt-user9" class="zt-user zt-box<?php echo $botsl2['user9']['class']; ?>" style="width:<?php echo $botsl2['user9']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user9" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
						
					<?php if($this->countModules('user10')) : ?>
					<div id="zt-user10" class="zt-user zt-box<?php echo $botsl2['user10']['class']; ?>" style="width:<?php echo $botsl2['user10']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user10" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>

				</div>
			</div>
		</div>
		<?php endif; ?>	
		
		<?php
		$spotlight = array ('user11','user12','user13','user14');
		$botsl3 = $ztTools->calSpotlight ($spotlight,$ztTools->isOP()?100:100,'%');
		if( $botsl3 ) :
		?>	
		<div id="zt-userwrap5" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-userwrap5-inner">

					<?php if($this->countModules('user11')) : ?>
					<div id="zt-user11" class="zt-user zt-box<?php echo $botsl3['user11']['class']; ?>" style="width: <?php echo $botsl3['user11']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user11" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
				
					<?php if($this->countModules('user12')) : ?>
					<div id="zt-user12" class="zt-user zt-box<?php echo $botsl3['user12']['class']; ?>" style="width: <?php echo $botsl3['user12']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user12" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
				
					<?php if($this->countModules('user13')) : ?>
					<div id="zt-user13" class="zt-user zt-box<?php echo $botsl3['user13']['class']; ?>" style="width: <?php echo $botsl3['user13']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user13" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>
				
					<?php if($this->countModules('user14')) : ?>
					<div id="zt-user14" class="zt-user zt-box<?php echo $botsl3['user14']['class']; ?>" style="width: <?php echo $botsl3['user14']['width']; ?>;">
						<div class="zt-box-inside">
							<jdoc:include type="modules" name="user14" style="ztxhtml" />
						</div>
					</div>
					<?php endif; ?>

				</div>
			</div>
		</div>
		<?php endif; ?>
		
		<div id="zt-bottom" class="clearfix">
			<div class="zt-wrapper">
				<div id="zt-bottom-inner">
					
					<div id="zt-footer">
						<div id="zt-footer-inner"><jdoc:include type="modules" name="footer" /></div>
					</div>
					
					<div id="zt-copyright">
						<div id="zt-copyright-inner">
							<?php if($ztTools->getParam('zt_footer')) : ?>
							<?php echo $ztTools->getParam('zt_footer_text'); ?>
							<?php else : ?>
							Copyright &copy; 2008 - <?php echo date('Y'); ?> <a href="http://www.zootemplate.com" title="Joomla Templates">Joomla Templates</a>  by <a href="http://www.zootemplate.com" title="ZooTemplate">ZooTemplate.Com</a>. All rights reserved.
							<?php endif; ?>
						</div>
					</div>

				</div>
			</div>
		</div>
		
</div>
<jdoc:include type="modules" name="debug" />

</body>
</html>